global save save

if "`c(username)'"=="marco"  {
global dropbox "/Users/${username}/Dropbox"
global master_file_path "${dropbox}/Engel_GFT/replication_files"
global stataloc "C:\Program Files\Stata17\StataMP-64.exe"
global intermediate "$master_file_path/data/intermediate_data"
global input "$master_file_path/data/source_data"
cd "$input"
}

else if "`c(username)'"=="YOUR NAME"  {
global dropbox "C:/Users/SET USERNAME HERE/Dropbox"
}


use "$intermediate/R43/consumption_items_43.dta",clear
merge m:1 itemcode43 using  "$input/R43/43to55codes.dta"
keep if _merge==3
drop _merge

*concord geographical variables
rename state43 statecode43
rename region43 regioncode43
gen concorded_statecode=statecode43
gen concorded_statelabel=statelabel43

merge m:1 statecode43 regioncode43 using "$input/R43/geo43to55codes.dta"
drop _merge


order Round sector statecode43 statelabel43 regioncode43 concorded_statecode concorded_statelabel concorded_region hhid hhsize wt mpce flag_mpce itemcode43 itemlabel43 grouplabel43 itemcode43_55c itemlabel43_55c quantity expenditure

$save "$intermediate/R43/concorded_consumption_items43.dta", replace

